package domain;

import java.util.LinkedHashSet;
import java.util.Set;

public class Room {

	private int id;
	
	private String roomName;
	private String roomDescription;
	private boolean active;
	private String roomRule;
	private Set<Message> messages = new LinkedHashSet<Message>();//TreeSet<Message>();  

	public Room() {}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getRoomName() {
		return roomName;
	}

	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}

	public String getRoomDescription() {
		return roomDescription;
	}

	public void setRoomDescription(String roomDescription) {
		this.roomDescription = roomDescription;
	}
	
	public boolean isActive() {
		return active;
	}
	
	public void setActive(boolean active) {
		this.active = active;
	}

	public String getRoomRule() {
		return roomRule;
	}

	public void setRoomRule(String roomRule) {
		this.roomRule = roomRule;
	}

	public Set<Message> getMessages() {
		return messages;
	}

	public void setMessages(Set<Message> messages) {
		this.messages = messages;
	}
	
	public void addMessage(Message message) {
		message.setRoom(this);
		this.messages.add(message);
	}
}
